package com.ticket.system.domain.vo;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.util.Objects;

@ApiModel(description = "座位比较对象")
public class SeatCompareVo {
    @ApiModelProperty(value = "场次id")
    private Long id;
    @ApiModelProperty(value = "场次id")
    private Long sessionId;
    @NotNull(message = "区域编码不可以为空")
    @ApiModelProperty(value = "区域编码")
    private Integer areaId;
    @NotNull(message = "排不可以为空")
    @Length(min = 1, max = 200, message = "排号不正确")
    @ApiModelProperty(value = "排")
    private Integer rowNumber;

    @NotNull(message = "位置不可以为空")
    @ApiModelProperty(value = "位置")
    private Integer xPos;

    private Long resveredId;

    public Long getResveredId() {
        return resveredId;
    }

    public void setResveredId(Long resveredId) {
        this.resveredId = resveredId;
    }


    public SeatCompareVo(Long sessionId, Integer areaId, Integer rowNumber, Integer xPos,Long resveredId){
        this.sessionId=sessionId;
        this.areaId=areaId;
        this.rowNumber=rowNumber;
        this.xPos=xPos;
        this.resveredId = resveredId;
    }
    public Long getSessionId() {
        return sessionId;
    }

    public void setSessionId(Long sessionId) {
        this.sessionId = sessionId;
    }

    public Integer getAreaId() {
        return areaId;
    }

    public void setAreaId(Integer areaId) {
        this.areaId = areaId;
    }

    public Integer getRowNumber() {
        return rowNumber;
    }

    public void setRowNumber(Integer rowNumber) {
        this.rowNumber = rowNumber;
    }

    public Integer getxPos() {
        return xPos;
    }

    public void setxPos(Integer xPos) {
        this.xPos = xPos;
    }


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SeatCompareVo seatVo = (SeatCompareVo) o;
        return Objects.equals(sessionId, seatVo.sessionId) && Objects.equals(areaId, seatVo.areaId) && Objects.equals(rowNumber, seatVo.rowNumber) && Objects.equals(xPos, seatVo.xPos);
    }

    @Override
    public int hashCode() {
        return Objects.hash(sessionId, areaId, rowNumber, xPos);
    }
}
